package MidAutumnFestival;
//9)输入三个int型的数据，放入到a,b,c三个变量中去，使用条件结构与交换逻辑将这三个变量中的值从小到大排列。

import java.util.Scanner;

public class Test9 {
    public static void main(String[] args) {
        int a, b, c, max, middle, min;
        System.out.println("输入三个整数：");
        Scanner sc = new Scanner(System.in);
        a = sc.nextInt();
        b = sc.nextInt();
        c = sc.nextInt();
        max = a;
        if (b > a && b > c) {
            max = b;
        }
        if (c > a && c > b) {
            max = c;
        }
        min = a;
        if (b < a && b < c) {
            min = b;
        }
        if (c < a && c < b) {
            min = c;
        }
        middle = (a + b + c) - (max + min);
        System.out.println(min + "," + middle + "," + max);
    }
}
